let storage = window.localStorage;
// 获取用户信息
export const getUserInfo = state => {
  if(state.userInfo.rybm) {
    return state.userInfo;
  }
  else if (storage.userInfo) {
    return JSON.parse(storage.userInfo);
  }
  else {
    return {};
  }
}

// 获取当前选中
export const getActiveItem = state => {
  if(state.activeItem.data) {
    return state.activeItem;
  }
  else if (storage.activeItem) {
    return JSON.parse(storage.activeItem);
  }
  else {
    return {};
  }
}

// 获取单位列表
export const getCompanyList = state => {
  return state.companyList;
}

// 获取筛选过的单位列表
export const getPeerCompanyList = state => {
  return state.peerCompanyList;
}